\(\int \frac {\log (e (\frac {a+b x}{c+d x})^n)}{f+g x+h x^2} \, dx\) [85]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F(-2)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 31, antiderivative size = 401 \[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=-\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}+\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h+(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}-\frac {n \operatorname {PolyLog}\left (2,\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}+\frac {n \operatorname {PolyLog}\left (2,\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h+(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}} \]

[Out]

-ln(e*((b*x+a)/(d*x+c))^n)*ln(1-2*(c^2*h-c*d*g+d^2*f)*(b*x+a)/(d*x+c)/(2*b*d*f-b*c*g-a*d*g+2*a*c*h-(-a*d+b*c)*
(-4*f*h+g^2)^(1/2)))/(-4*f*h+g^2)^(1/2)+ln(e*((b*x+a)/(d*x+c))^n)*ln(1-2*(c^2*h-c*d*g+d^2*f)*(b*x+a)/(d*x+c)/(
2*b*d*f-b*c*g-a*d*g+2*a*c*h+(-a*d+b*c)*(-4*f*h+g^2)^(1/2)))/(-4*f*h+g^2)^(1/2)-n*polylog(2,2*(c^2*h-c*d*g+d^2*
f)*(b*x+a)/(d*x+c)/(2*b*d*f-b*c*g-a*d*g+2*a*c*h-(-a*d+b*c)*(-4*f*h+g^2)^(1/2)))/(-4*f*h+g^2)^(1/2)+n*polylog(2
,2*(c^2*h-c*d*g+d^2*f)*(b*x+a)/(d*x+c)/(2*b*d*f-b*c*g-a*d*g+2*a*c*h+(-a*d+b*c)*(-4*f*h+g^2)^(1/2)))/(-4*f*h+g^
2)^(1/2)

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 401, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {2576, 2404, 2354, 2438} \[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=-\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 (a+b x) \left (c^2 h-c d g+d^2 f\right )}{(c+d x) \left (-\sqrt {g^2-4 f h} (b c-a d)+2 a c h-a d g-b c g+2 b d f\right )}\right )}{\sqrt {g^2-4 f h}}+\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 (a+b x) \left (c^2 h-c d g+d^2 f\right )}{(c+d x) \left (\sqrt {g^2-4 f h} (b c-a d)+2 a c h-a d g-b c g+2 b d f\right )}\right )}{\sqrt {g^2-4 f h}}-\frac {n \operatorname {PolyLog}\left (2,\frac {2 \left (h c^2-d g c+d^2 f\right ) (a+b x)}{\left (-\sqrt {g^2-4 f h} (b c-a d)+2 b d f-b c g-a d g+2 a c h\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}+\frac {n \operatorname {PolyLog}\left (2,\frac {2 \left (h c^2-d g c+d^2 f\right ) (a+b x)}{\left (\sqrt {g^2-4 f h} (b c-a d)+2 b d f-b c g-a d g+2 a c h\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}} \]

[In]

Int[Log[e*((a + b*x)/(c + d*x))^n]/(f + g*x + h*x^2),x]

[Out]

-((Log[e*((a + b*x)/(c + d*x))^n]*Log[1 - (2*(d^2*f - c*d*g + c^2*h)*(a + b*x))/((2*b*d*f - b*c*g - a*d*g + 2*
a*c*h - (b*c - a*d)*Sqrt[g^2 - 4*f*h])*(c + d*x))])/Sqrt[g^2 - 4*f*h]) + (Log[e*((a + b*x)/(c + d*x))^n]*Log[1
 - (2*(d^2*f - c*d*g + c^2*h)*(a + b*x))/((2*b*d*f - b*c*g - a*d*g + 2*a*c*h + (b*c - a*d)*Sqrt[g^2 - 4*f*h])*
(c + d*x))])/Sqrt[g^2 - 4*f*h] - (n*PolyLog[2, (2*(d^2*f - c*d*g + c^2*h)*(a + b*x))/((2*b*d*f - b*c*g - a*d*g
 + 2*a*c*h - (b*c - a*d)*Sqrt[g^2 - 4*f*h])*(c + d*x))])/Sqrt[g^2 - 4*f*h] + (n*PolyLog[2, (2*(d^2*f - c*d*g +
 c^2*h)*(a + b*x))/((2*b*d*f - b*c*g - a*d*g + 2*a*c*h + (b*c - a*d)*Sqrt[g^2 - 4*f*h])*(c + d*x))])/Sqrt[g^2
- 4*f*h]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2576

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*(P2x_)^(m_.), x_Symbol]
 :> With[{f = Coeff[P2x, x, 0], g = Coeff[P2x, x, 1], h = Coeff[P2x, x, 2]}, Dist[b*c - a*d, Subst[Int[(b^2*f
- a*b*g + a^2*h - (2*b*d*f - b*c*g - a*d*g + 2*a*c*h)*x + (d^2*f - c*d*g + c^2*h)*x^2)^m*((A + B*Log[e*x^n])^p
/(b - d*x)^(2*(m + 1))), x], x, (a + b*x)/(c + d*x)], x]] /; FreeQ[{a, b, c, d, e, A, B, n}, x] && PolyQ[P2x,
x, 2] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = (b c-a d) \text {Subst}\left (\int \frac {\log \left (e x^n\right )}{b^2 f-a b g+a^2 h-(2 b d f-b c g-a d g+2 a c h) x+\left (d^2 f-c d g+c^2 h\right ) x^2} \, dx,x,\frac {a+b x}{c+d x}\right ) \\ & = (b c-a d) \text {Subst}\left (\int \left (\frac {2 \left (d^2 f-c d g+c^2 h\right ) \log \left (e x^n\right )}{(b c-a d) \sqrt {g^2-4 f h} \left (2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}-2 \left (d^2 f-c d g+c^2 h\right ) x\right )}+\frac {2 \left (d^2 f-c d g+c^2 h\right ) \log \left (e x^n\right )}{(b c-a d) \sqrt {g^2-4 f h} \left (-2 b d f+b c g+a d g-2 a c h-(b c-a d) \sqrt {g^2-4 f h}+2 \left (d^2 f-c d g+c^2 h\right ) x\right )}\right ) \, dx,x,\frac {a+b x}{c+d x}\right ) \\ & = \frac {\left (2 \left (d^2 f-c d g+c^2 h\right )\right ) \text {Subst}\left (\int \frac {\log \left (e x^n\right )}{2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}-2 \left (d^2 f-c d g+c^2 h\right ) x} \, dx,x,\frac {a+b x}{c+d x}\right )}{\sqrt {g^2-4 f h}}+\frac {\left (2 \left (d^2 f-c d g+c^2 h\right )\right ) \text {Subst}\left (\int \frac {\log \left (e x^n\right )}{-2 b d f+b c g+a d g-2 a c h-(b c-a d) \sqrt {g^2-4 f h}+2 \left (d^2 f-c d g+c^2 h\right ) x} \, dx,x,\frac {a+b x}{c+d x}\right )}{\sqrt {g^2-4 f h}} \\ & = -\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}+\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h+(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}-\frac {n \text {Subst}\left (\int \frac {\log \left (1+\frac {2 \left (d^2 f-c d g+c^2 h\right ) x}{-2 b d f+b c g+a d g-2 a c h-(b c-a d) \sqrt {g^2-4 f h}}\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{\sqrt {g^2-4 f h}}+\frac {n \text {Subst}\left (\int \frac {\log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) x}{2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}}\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{\sqrt {g^2-4 f h}} \\ & = -\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}+\frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h+(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}-\frac {n \text {Li}_2\left (\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h-(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}}+\frac {n \text {Li}_2\left (\frac {2 \left (d^2 f-c d g+c^2 h\right ) (a+b x)}{\left (2 b d f-b c g-a d g+2 a c h+(b c-a d) \sqrt {g^2-4 f h}\right ) (c+d x)}\right )}{\sqrt {g^2-4 f h}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 515, normalized size of antiderivative = 1.28 \[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=\frac {-n \log \left (\frac {2 h (a+b x)}{-b g+2 a h+b \sqrt {g^2-4 f h}}\right ) \log \left (g-\sqrt {g^2-4 f h}+2 h x\right )+\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (g-\sqrt {g^2-4 f h}+2 h x\right )+n \log \left (\frac {2 h (c+d x)}{-d g+2 c h+d \sqrt {g^2-4 f h}}\right ) \log \left (g-\sqrt {g^2-4 f h}+2 h x\right )+n \log \left (\frac {2 h (a+b x)}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right ) \log \left (g+\sqrt {g^2-4 f h}+2 h x\right )-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (g+\sqrt {g^2-4 f h}+2 h x\right )-n \log \left (\frac {2 h (c+d x)}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right ) \log \left (g+\sqrt {g^2-4 f h}+2 h x\right )+n \operatorname {PolyLog}\left (2,\frac {d \left (-g+\sqrt {g^2-4 f h}-2 h x\right )}{-d g+2 c h+d \sqrt {g^2-4 f h}}\right )-n \operatorname {PolyLog}\left (2,\frac {b \left (-g+\sqrt {g^2-4 f h}-2 h x\right )}{2 a h+b \left (-g+\sqrt {g^2-4 f h}\right )}\right )+n \operatorname {PolyLog}\left (2,\frac {b \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{-2 a h+b \left (g+\sqrt {g^2-4 f h}\right )}\right )-n \operatorname {PolyLog}\left (2,\frac {d \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{-2 c h+d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{\sqrt {g^2-4 f h}} \]

[In]

Integrate[Log[e*((a + b*x)/(c + d*x))^n]/(f + g*x + h*x^2),x]

[Out]

(-(n*Log[(2*h*(a + b*x))/(-(b*g) + 2*a*h + b*Sqrt[g^2 - 4*f*h])]*Log[g - Sqrt[g^2 - 4*f*h] + 2*h*x]) + Log[e*(
(a + b*x)/(c + d*x))^n]*Log[g - Sqrt[g^2 - 4*f*h] + 2*h*x] + n*Log[(2*h*(c + d*x))/(-(d*g) + 2*c*h + d*Sqrt[g^
2 - 4*f*h])]*Log[g - Sqrt[g^2 - 4*f*h] + 2*h*x] + n*Log[(2*h*(a + b*x))/(2*a*h - b*(g + Sqrt[g^2 - 4*f*h]))]*L
og[g + Sqrt[g^2 - 4*f*h] + 2*h*x] - Log[e*((a + b*x)/(c + d*x))^n]*Log[g + Sqrt[g^2 - 4*f*h] + 2*h*x] - n*Log[
(2*h*(c + d*x))/(2*c*h - d*(g + Sqrt[g^2 - 4*f*h]))]*Log[g + Sqrt[g^2 - 4*f*h] + 2*h*x] + n*PolyLog[2, (d*(-g
+ Sqrt[g^2 - 4*f*h] - 2*h*x))/(-(d*g) + 2*c*h + d*Sqrt[g^2 - 4*f*h])] - n*PolyLog[2, (b*(-g + Sqrt[g^2 - 4*f*h
] - 2*h*x))/(2*a*h + b*(-g + Sqrt[g^2 - 4*f*h]))] + n*PolyLog[2, (b*(g + Sqrt[g^2 - 4*f*h] + 2*h*x))/(-2*a*h +
 b*(g + Sqrt[g^2 - 4*f*h]))] - n*PolyLog[2, (d*(g + Sqrt[g^2 - 4*f*h] + 2*h*x))/(-2*c*h + d*(g + Sqrt[g^2 - 4*
f*h]))])/Sqrt[g^2 - 4*f*h]

Maple [F]

\[\int \frac {\ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )}{h \,x^{2}+g x +f}d x\]

[In]

int(ln(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x)

[Out]

int(ln(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x)

Fricas [F]

\[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=\int { \frac {\log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )}{h x^{2} + g x + f} \,d x } \]

[In]

integrate(log(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x, algorithm="fricas")

[Out]

integral(log(e*((b*x + a)/(d*x + c))^n)/(h*x^2 + g*x + f), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=\text {Timed out} \]

[In]

integrate(ln(e*((b*x+a)/(d*x+c))**n)/(h*x**2+g*x+f),x)

[Out]

Timed out

Maxima [F(-2)]

Exception generated. \[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(log(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*f*h-g^2>0)', see `assume?` f
or more deta

Giac [F]

\[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=\int { \frac {\log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )}{h x^{2} + g x + f} \,d x } \]

[In]

integrate(log(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x, algorithm="giac")

[Out]

integrate(log(e*((b*x + a)/(d*x + c))^n)/(h*x^2 + g*x + f), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx=\int \frac {\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{h\,x^2+g\,x+f} \,d x \]

[In]

int(log(e*((a + b*x)/(c + d*x))^n)/(f + g*x + h*x^2),x)

[Out]

int(log(e*((a + b*x)/(c + d*x))^n)/(f + g*x + h*x^2), x)